package Homework2;

import java.util.Scanner;

public class Homework2_9 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        int n = input.nextInt();
        int len = Length.length(s);
        System.out.println(len);
        len = Length.length(n);
        System.out.println(len);
    }
}
